home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / simpsons.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  17KB  |  446 lines

  1. /***************************************************************************
  2.  
  3. The Simpsons (c) 1991 Konami Co. Ltd
  4.  
  5. Preliminary driver by:
  6. Ernesto Corvi
  7. someone@secureshell.com
  8.  
  9. ***************************************************************************/
  10.  
  11. #include "driver.h"
  12. #include "vidhrdw/generic.h"
  13. #include "cpu/konami/konami.h" /* for the callback and the firq irq definition */
  14. #include "cpu/z80/z80.h"
  15. #include "vidhrdw/konamiic.h"
  16.  
  17. /* from vidhrdw */
  18. int simpsons_vh_start( void );
  19. void simpsons_vh_stop( void );
  20. WRITE_HANDLER( simpsons_priority_w );
  21. void simpsons_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  22.  
  23. /* from machine */
  24. READ_HANDLER( simpsons_eeprom_r );
  25. WRITE_HANDLER( simpsons_eeprom_w );
  26. WRITE_HANDLER( simpsons_coin_counter_w );
  27. READ_HANDLER( simpsons_sound_interrupt_r );
  28. READ_HANDLER( simpsons_sound_r );
  29. READ_HANDLER( simpsons_speedup1_r );
  30. READ_HANDLER( simpsons_speedup2_r );
  31. void simpsons_init_machine( void );
  32. void simpsons_nvram_handler(void *file,int read_or_write);
  33. extern int simpsons_firq_enabled;
  34.  
  35. /***************************************************************************
  36.  
  37.   Memory Maps
  38.  
  39. ***************************************************************************/
  40.  
  41. static struct MemoryReadAddress readmem[] =
  42. {
  43.     { 0x0000, 0x0fff, MRA_BANK3 },
  44.     { 0x1f80, 0x1f80, input_port_4_r },
  45.     { 0x1f81, 0x1f81, simpsons_eeprom_r },
  46.     { 0x1f90, 0x1f90, input_port_0_r },
  47.     { 0x1f91, 0x1f91, input_port_1_r },
  48.     { 0x1f92, 0x1f92, input_port_2_r },
  49.     { 0x1f93, 0x1f93, input_port_3_r },
  50.     { 0x1fc4, 0x1fc4, simpsons_sound_interrupt_r },
  51.     { 0x1fc6, 0x1fc7, simpsons_sound_r },    /* K053260 */
  52.     { 0x1fc8, 0x1fc9, K053246_r },
  53.     { 0x1fca, 0x1fca, watchdog_reset_r },
  54.     { 0x2000, 0x3fff, MRA_BANK4 },
  55.     { 0x0000, 0x3fff, K052109_r },
  56.     { 0x4856, 0x4856, simpsons_speedup2_r },
  57.     { 0x4942, 0x4942, simpsons_speedup1_r },
  58.     { 0x4000, 0x5fff, MRA_RAM },
  59.     { 0x6000, 0x7fff, MRA_BANK1 },
  60.     { 0x8000, 0xffff, MRA_ROM },
  61.     { -1 }    /* end of table */
  62. };
  63.  
  64. static struct MemoryWriteAddress writemem[] =
  65. {
  66.     { 0x0000, 0x0fff, MWA_BANK3 },
  67.     { 0x1fa0, 0x1fa7, K053246_w },
  68.     { 0x1fb0, 0x1fbf, K053251_w },
  69.     { 0x1fc0, 0x1fc0, simpsons_coin_counter_w },
  70.     { 0x1fc2, 0x1fc2, simpsons_eeprom_w },
  71.     { 0x1fc6, 0x1fc7, K053260_w },
  72.     { 0x2000, 0x3fff, MWA_BANK4 },
  73.     { 0x0000, 0x3fff, K052109_w },
  74.     { 0x4000, 0x5fff, MWA_RAM },
  75.     { 0x6000, 0x7fff, MWA_ROM },
  76.     { 0x8000, 0xffff, MWA_ROM },
  77.     { -1 }    /* end of table */
  78. };
  79.  
  80. static WRITE_HANDLER( z80_bankswitch_w )
  81. {
  82.     unsigned char *RAM = memory_region(REGION_CPU2);
  83.  
  84.     offset = 0x10000 + ( ( ( data & 7 ) - 2 ) * 0x4000 );
  85.  
  86.     cpu_setbank( 2, &RAM[ offset ] );
  87. }
  88.  
  89. static int nmi_enabled;
  90.  
  91. static void sound_nmi_callback( int param )
  92. {
  93.     cpu_set_nmi_line( 1, ( nmi_enabled ) ? CLEAR_LINE : ASSERT_LINE );
  94.  
  95.     nmi_enabled = 0;
  96. }
  97.  
  98. static void nmi_callback(int param)
  99. {
  100.     cpu_set_nmi_line(1,ASSERT_LINE);
  101. }
  102.  
  103. static WRITE_HANDLER( z80_arm_nmi_w )
  104. {
  105. //    sound_nmi_enabled = 1;
  106.     cpu_set_nmi_line(1,CLEAR_LINE);
  107.     timer_set(TIME_IN_USEC(50),0,nmi_callback);    /* kludge until the K053260 is emulated correctly */
  108. }
  109.  
  110. static struct MemoryReadAddress z80_readmem[] =
  111. {
  112.     { 0x0000, 0x7fff, MRA_ROM },
  113.     { 0x8000, 0xbfff, MRA_BANK2 },
  114.     { 0xf000, 0xf7ff, MRA_RAM },
  115.     { 0xf801, 0xf801, YM2151_status_port_0_r },
  116.     { 0xfc00, 0xfc2f, K053260_r },
  117.     { -1 }    /* end of table */
  118. };
  119.  
  120. static struct MemoryWriteAddress z80_writemem[] =
  121. {
  122.     { 0x0000, 0x7fff, MWA_ROM },
  123.     { 0x8000, 0xbfff, MWA_ROM },
  124.     { 0xf000, 0xf7ff, MWA_RAM },
  125.     { 0xf800, 0xf800, YM2151_register_port_0_w },
  126.     { 0xf801, 0xf801, YM2151_data_port_0_w },
  127.     { 0xfa00, 0xfa00, z80_arm_nmi_w },
  128.     { 0xfc00, 0xfc2f, K053260_w },
  129.     { 0xfe00, 0xfe00, z80_bankswitch_w },
  130.     { -1 }    /* end of table */
  131. };
  132.  
  133. /***************************************************************************
  134.  
  135.     Input Ports
  136.  
  137. ***************************************************************************/
  138.  
  139. INPUT_PORTS_START( simpsons )
  140.     PORT_START /* IN0 - Player 1 */
  141.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  142.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  143.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  144.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  145.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  146.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  147.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  148.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  149.  
  150.     PORT_START    /* IN1 - Player 2 */
  151.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  152.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  153.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  154.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  155.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  156.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  157.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  158.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  159.  
  160.     PORT_START    /* IN2 - Player 3 - Used on the 4p version */
  161.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER3 )
  162.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
  163.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER3 )
  164.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER3 )
  165.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  166.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  167.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
  168.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 )
  169.  
  170.     PORT_START    /* IN3 - Player 4 - Used on the 4p version */
  171.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER4 )
  172.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
  173.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER4 )
  174.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER4 )
  175.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  176.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  177.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
  178.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
  179.  
  180.     PORT_START /* IN4 */
  181.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  182.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  183.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  184.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 )
  185.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  186.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  187.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  188.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  189.  
  190.     PORT_START /* IN5 */
  191.     PORT_BITX(0x01, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  192.     PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN )
  193. INPUT_PORTS_END
  194.  
  195. INPUT_PORTS_START( simpsn2p )
  196.     PORT_START /* IN0 - Player 1 */
  197.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  198.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  199.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  200.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  201.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  202.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  203.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  204.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  205.  
  206.     PORT_START    /* IN1 - Player 2 */
  207.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  208.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  209.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  210.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  211.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  212.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  213.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  214.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  215.  
  216.     PORT_START    /* IN2 - Player 3 - Used on the 4p version */
  217. //    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER3 )
  218. //    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
  219. //    PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER3 )
  220. //    PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER3 )
  221. //    PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  222. //    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  223. //    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
  224. //    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 )
  225.  
  226.     PORT_START    /* IN3 - Player 4 - Used on the 4p version */
  227. //    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER4 )
  228. //    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
  229. //    PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER4 )
  230. //    PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER4 )
  231. //    PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  232. //    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  233. //    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
  234. //    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
  235.  
  236.     PORT_START /* IN4 */
  237.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  238.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  239.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  240.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  241.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 )
  242.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  243.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  244.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  245.  
  246.     PORT_START /* IN5 */
  247.     PORT_BITX(0x01, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  248.     PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN )
  249. INPUT_PORTS_END
  250.  
  251.  
  252.  
  253. /***************************************************************************
  254.  
  255.     Machine Driver
  256.  
  257. ***************************************************************************/
  258.  
  259. static struct YM2151interface ym2151_interface =
  260. {
  261.     1,            /* 1 chip */
  262.     3579545,    /* 3.579545 MHz */
  263.     { YM3012_VOL(70,MIXER_PAN_CENTER,0,MIXER_PAN_CENTER) },    /* only left channel is connected */
  264.     { 0 }
  265. };
  266.  
  267. static struct K053260_interface k053260_interface =
  268. {
  269.     3579545,
  270.     REGION_SOUND1, /* memory region */
  271.     { MIXER(75,MIXER_PAN_LEFT), MIXER(75,MIXER_PAN_RIGHT) },
  272. //    nmi_callback
  273. };
  274.  
  275. static int simpsons_irq(void)
  276. {
  277.     if (cpu_getiloops() == 0)
  278.     {
  279.         if (simpsons_firq_enabled && K053247_is_IRQ_enabled())
  280.             return KONAMI_INT_FIRQ;
  281.     }
  282.     else
  283.     {
  284.         if (K052109_is_IRQ_enabled())
  285.             return KONAMI_INT_IRQ;
  286.     }
  287.  
  288.     return ignore_interrupt();
  289. }
  290.  
  291. static struct MachineDriver machine_driver_simpsons =
  292. {
  293.     /* basic machine hardware */
  294.     {
  295.         {
  296.             CPU_KONAMI,
  297.             3000000, /* ? */
  298.             readmem,writemem,0,0,
  299.             simpsons_irq,2,    /* IRQ triggered by the 052109, FIRQ by the sprite hardware */
  300.         },
  301.         {
  302.             CPU_Z80 | CPU_AUDIO_CPU,
  303.             3579545,
  304.             z80_readmem,z80_writemem,0,0,
  305.             ignore_interrupt,0    /* IRQs are triggered by the main CPU */
  306.                                 /* NMIs are generated by the 053260 */
  307.         }
  308.     },
  309.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  310.     1,    /* inter-cpu interleaving factor */
  311.     simpsons_init_machine,
  312.  
  313.     /* video hardware */
  314.     64*8, 32*8, { 14*8, (64-14)*8-1, 2*8, 30*8-1 },
  315.     0,    /* gfx decoded by konamiic.c */
  316.     2048, 2048,
  317.     0,
  318.  
  319.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  320.     0,
  321.     simpsons_vh_start,
  322.     simpsons_vh_stop,
  323.     simpsons_vh_screenrefresh,
  324.  
  325.     /* sound hardware */
  326.     SOUND_SUPPORTS_STEREO,0,0,0,
  327.     {
  328.         {
  329.             SOUND_YM2151,
  330.             &ym2151_interface
  331.         },
  332.         {
  333.             SOUND_K053260,
  334.             &k053260_interface
  335.         }
  336.     },
  337.  
  338.     simpsons_nvram_handler
  339. };
  340.  
  341.  
  342. /***************************************************************************
  343.  
  344.   Game ROMs
  345.  
  346. ***************************************************************************/
  347.  
  348. ROM_START( simpsons )
  349.     ROM_REGION( 0x8a000, REGION_CPU1 ) /* code + banked roms + banked ram */
  350.     ROM_LOAD( "g02.16c",      0x10000, 0x20000, 0x580ce1d6 )
  351.     ROM_LOAD( "g01.17c",      0x30000, 0x20000, 0x9f843def )
  352.     ROM_LOAD( "j13.13c",      0x50000, 0x20000, 0xaade2abd )
  353.     ROM_LOAD( "j12.15c",      0x70000, 0x18000, 0x479e12f2 )
  354.     ROM_CONTINUE(              0x08000, 0x08000 )
  355.  
  356.     ROM_REGION( 0x28000, REGION_CPU2 ) /* Z80 code + banks */
  357.     ROM_LOAD( "e03.6g",       0x00000, 0x08000, 0x866b7a35 )
  358.     ROM_CONTINUE(              0x10000, 0x18000 )
  359.  
  360.     ROM_REGION( 0x100000, REGION_GFX1 ) /* graphics ( dont dispose as the program can read them ) */
  361.     ROM_LOAD( "simp_18h.rom", 0x000000, 0x080000, 0xba1ec910 )    /* tiles */
  362.     ROM_LOAD( "simp_16h.rom", 0x080000, 0x080000, 0xcf2bbcab )
  363.  
  364.     ROM_REGION( 0x400000, REGION_GFX2 ) /* graphics ( dont dispose as the program can read them ) */
  365.     ROM_LOAD( "simp_3n.rom",  0x000000, 0x100000, 0x7de500ad )    /* sprites */
  366.     ROM_LOAD( "simp_8n.rom",  0x100000, 0x100000, 0xaa085093 )
  367.     ROM_LOAD( "simp_12n.rom", 0x200000, 0x100000, 0x577dbd53 )
  368.     ROM_LOAD( "simp_16l.rom", 0x300000, 0x100000, 0x55fab05d )
  369.  
  370.     ROM_REGION( 0x140000, REGION_SOUND1 ) /* samples for the 053260 */
  371.     ROM_LOAD( "simp_1f.rom", 0x000000, 0x100000, 0x1397a73b )
  372.     ROM_LOAD( "simp_1d.rom", 0x100000, 0x040000, 0x78778013 )
  373. ROM_END
  374.  
  375. ROM_START( simpsn2p )
  376.     ROM_REGION( 0x8a000, REGION_CPU1 ) /* code + banked roms + banked ram */
  377.     ROM_LOAD( "g02.16c",      0x10000, 0x20000, 0x580ce1d6 )
  378.     ROM_LOAD( "simp_p01.rom", 0x30000, 0x20000, 0x07ceeaea )
  379.     ROM_LOAD( "simp_013.rom", 0x50000, 0x20000, 0x8781105a )
  380.     ROM_LOAD( "simp_012.rom", 0x70000, 0x18000, 0x244f9289 )
  381.     ROM_CONTINUE(              0x08000, 0x08000 )
  382.  
  383.     ROM_REGION( 0x28000, REGION_CPU2 ) /* Z80 code + banks */
  384.     ROM_LOAD( "simp_g03.rom", 0x00000, 0x08000, 0x76c1850c )
  385.     ROM_CONTINUE(              0x10000, 0x18000 )
  386.  
  387.     ROM_REGION( 0x100000, REGION_GFX1 ) /* graphics ( dont dispose as the program can read them ) */
  388.     ROM_LOAD( "simp_18h.rom", 0x000000, 0x080000, 0xba1ec910 )    /* tiles */
  389.     ROM_LOAD( "simp_16h.rom", 0x080000, 0x080000, 0xcf2bbcab )
  390.  
  391.     ROM_REGION( 0x400000, REGION_GFX2 ) /* graphics ( dont dispose as the program can read them ) */
  392.     ROM_LOAD( "simp_3n.rom",  0x000000, 0x100000, 0x7de500ad )    /* sprites */
  393.     ROM_LOAD( "simp_8n.rom",  0x100000, 0x100000, 0xaa085093 )
  394.     ROM_LOAD( "simp_12n.rom", 0x200000, 0x100000, 0x577dbd53 )
  395.     ROM_LOAD( "simp_16l.rom", 0x300000, 0x100000, 0x55fab05d )
  396.  
  397.     ROM_REGION( 0x140000, REGION_SOUND1 ) /* samples for the 053260 */
  398.     ROM_LOAD( "simp_1f.rom", 0x000000, 0x100000, 0x1397a73b )
  399.     ROM_LOAD( "simp_1d.rom", 0x100000, 0x040000, 0x78778013 )
  400. ROM_END
  401.  
  402. ROM_START( simps2pj )
  403.     ROM_REGION( 0x8a000, REGION_CPU1 ) /* code + banked roms + banked ram */
  404.     ROM_LOAD( "072-s02.16c",  0x10000, 0x20000, 0x265f7a47 )
  405.     ROM_LOAD( "072-t01.17c",  0x30000, 0x20000, 0x91de5c2d )
  406.     ROM_LOAD( "072-213.13c",  0x50000, 0x20000, 0xb326a9ae )
  407.     ROM_LOAD( "072-212.15c",  0x70000, 0x18000, 0x584d9d37 )
  408.     ROM_CONTINUE(              0x08000, 0x08000 )
  409.  
  410.     ROM_REGION( 0x28000, REGION_CPU2 ) /* Z80 code + banks */
  411.     ROM_LOAD( "simp_g03.rom", 0x00000, 0x08000, 0x76c1850c )
  412.     ROM_CONTINUE(              0x10000, 0x18000 )
  413.  
  414.     ROM_REGION( 0x100000, REGION_GFX1 ) /* graphics ( dont dispose as the program can read them ) */
  415.     ROM_LOAD( "simp_18h.rom", 0x000000, 0x080000, 0xba1ec910 )    /* tiles */
  416.     ROM_LOAD( "simp_16h.rom", 0x080000, 0x080000, 0xcf2bbcab )
  417.  
  418.     ROM_REGION( 0x400000, REGION_GFX2 ) /* graphics ( dont dispose as the program can read them ) */
  419.     ROM_LOAD( "simp_3n.rom",  0x000000, 0x100000, 0x7de500ad )    /* sprites */
  420.     ROM_LOAD( "simp_8n.rom",  0x100000, 0x100000, 0xaa085093 )
  421.     ROM_LOAD( "simp_12n.rom", 0x200000, 0x100000, 0x577dbd53 )
  422.     ROM_LOAD( "simp_16l.rom", 0x300000, 0x100000, 0x55fab05d )
  423.  
  424.     ROM_REGION( 0x140000, REGION_SOUND1 ) /* samples for the 053260 */
  425.     ROM_LOAD( "simp_1f.rom", 0x000000, 0x100000, 0x1397a73b )
  426.     ROM_LOAD( "simp_1d.rom", 0x100000, 0x040000, 0x78778013 )
  427. ROM_END
  428.  
  429.  
  430.  
  431. /***************************************************************************
  432.  
  433.   Game driver(s)
  434.  
  435. ***************************************************************************/
  436.  
  437. static void init_simpsons(void)
  438. {
  439.     konami_rom_deinterleave_2(REGION_GFX1);
  440.     konami_rom_deinterleave_4(REGION_GFX2);
  441. }
  442.  
  443. GAME( 1991, simpsons, 0,        simpsons, simpsons, simpsons, ROT0, "Konami", "The Simpsons (4 Players)" )
  444. GAME( 1991, simpsn2p, simpsons, simpsons, simpsn2p, simpsons, ROT0, "Konami", "The Simpsons (2 Players)" )
  445. GAME( 1991, simps2pj, simpsons, simpsons, simpsn2p, simpsons, ROT0, "Konami", "The Simpsons (2 Players Japan)" )
  446.